<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>C++ Tutorial: Multi-Threaded Programming - C++ Class Thread for Pthreads</title>
  <meta
 content="C++ Tutorial: Multi-Threaded Programming III"
 name="description" />
  <meta
 content="C++ Tutorial, Multi-Threaded Programming III, MultiThreading Programming, Pthreads(), Runnable, join(), start(), C++ Threads for Pthread"
 name="keywords" />
  <meta http-equiv="Content-Type"
 content="text/html; charset=ISO-8859-1" />
  <link type="text/css" rel="stylesheet" href="../images/bogostyleWidePre.css" />
</head>
<body>
<div id="page" align="center">
<div id="content" style="width: 800px;">
<div id="logo">
<div class="whitetitle" style="margin-top: 70px;">bogotobogo </div>
</div>
<div id="topheader">
<div class="headerbodytext" align="left"><br />
<strong>Bogotobogo</strong><br />
contact@bogotobogo.com </div>
<div class="smallgraytext" id="toplinks"><a href="../index.html">Home</a>
| <a href="../sitemap.html">Sitemap</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="menu">
<div class="smallwhitetext" style="padding: 9px;" align="right"><a
 href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">Products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="../blog" target="_blank">Contact Us</a>
</div>
</div>
<div id="submenu">
<div class="smallgraytext" style="padding: 9px;" align="right">
<a href="../gif.html">Gif</a> 
|<a href="../java_applet.html">JavaApplet/Web Start</a>
| <a href="../flash.html">Flash</a>
| <a href="../shockwave.html">ShockWave</a>
| <a href="../svg.html">SVG</a>
| <a href="../iPhone.html">iPhone/iPad</a>
| <a href="../android.html">Android</a>
| <a href="../OnHTML5.html">HTML5</a>
| <a href="../Algorithms/algorithms.html">Algorithms</a>
| <a href="../News/NewsMain.html">News</a>
| <a href="../cplusplus/cpptut.html">C++</a>
| <a href="../Java/tutorial/on_java.html">Java</a>
| <a href="../php/phptut.html">PHP</a>
| <a href="../DesignPatterns/introduction.html">Design Patterns</a>
| <a href="../python/pytut.html">Python</a> 
| <a href="../CSharp/.netframework.html">C#</a>
| <a href="../forums.html">Forums</a> 
| <a href="../VisualBasicSQL/introduction.html">Visual Basic</a>
</div>
</div>

<div id="contenttext">

<!-- Use of this code assumes agreement with the Google Custom Search Terms of Service. -->
<!-- The terms of service are available at http://www.google.com/cse/docs/tos.html -->
<form name="cse" id="searchbox_demo" action="http://www.google.com/cse">
  <input type="hidden" name="cref" value="" />
  <input type="hidden" name="ie" value="utf-8" />
  <input type="hidden" name="hl" value="" />
  <input name="q" type="text" size="40" />
  <input type="submit" name="sa" value="Search" />
</form>
<script type="text/javascript" src="http://www.google.com/cse/tools/onthefly?form=searchbox_demo&lang="></script>

<div id="bookmarkshare">
<script type="text/javascript">var addthis_config = {"data_track_clickback":true};</script>
<a class="addthis_button" href="http://www.addthis.com/bookmark.php?v=250&amp;username=khhong7"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=khhong7"></script>
</div>
<br />
<br />
<br />
<br />
<div style="padding: 10px;"><span class="titletext">C++ Tutorial<br />
Multi-Threaded Programming III <br />
- C++ Class Thread for Pthreads</span></div>
<img src="../images/cplusplus/cpp_logo.jpg" alt="cplusplus logo"/>

<div class="bodytext" style="padding: 12px;" align="justify"> 
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>   
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors (Function Objects)</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL) I</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="stl3_iterators.html">Standard Template Library (STL) III - Iterators</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>   
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>
</ul>
</div>
<br />

<br />
<br />
<img src="images/multithread3/YangYang.png" alt="YangYang"/>
<br />
<br />
<br />
<br />


<div class="bodytext" style="padding: 12px;" align="justify">
<div class="subtitle" id="mthread3">Multi-Threaded Programming III</div>
<br />
<br />
<div class="subtitle_2nd" id="pthread">What are Pthreads?</div>
<ul>
	<li><strong>POSIX Threads</strong>, or <strong>Pthreads</strong>, is a POSIX standard for threads. The standard, POSIX.1c, Threads extensions (IEEE Std 1003.1c-1995), defines an API for creating and manipulating threads.</li>

	<li>Implementations of the API are available on many Unix-like POSIX systems such as <strong>FreeBSD</strong>, <strong>NetBSD</strong>, <strong>GNU/Linux</strong>, <strong>Mac OS X</strong> and <strong>Solaris</strong>, but <strong>Microsoft Windows</strong> implementations also exist. For example, the pthreads-w32 is available and supports a subset of the Pthread API for the Windows 32-bit platform.</li>
	<li>The POSIX standard has continued to evolve and undergo revisions, including the Pthreads specification. The latest version is known as IEEE Std 1003.1, 2004 Edition. </li>
	<li>Pthreads are defined as a set of C language programming types and procedure calls, implemented with a <strong>pthread.h</strong> header/include file and a thread library - though this library may be part of another library, such as <strong>libc</strong>, in some implementations. </li>
</ul>
<br />
<br />
<br />

<div class="subtitle_2nd" id="pthread_api">The Pthread API</div>
<p>Pthreads API can be grouped into four: </p>
<ul>
<li><strong>Thread management:</strong><br/> 
	Routines that work directly on threads - creating, detaching, joining, etc. They also include functions to set/query thread attributes such as joinable, scheduling etc. </li>
<br />
<li><strong>Mutexes:</strong><br/> 
	 Routines that deal with synchronization, called a "mutex", which is an abbreviation for "mutual exclusion". Mutex functions provide for creating, destroying, locking and unlocking mutexes. These are supplemented by mutex attribute functions that set or modify attributes associated with mutexes. </li>
<br />
<li><strong>Condition variables:</strong><br/> 
	 Routines that address communications between threads that share a mutex. Based upon programmer specified conditions. This group includes functions to create, destroy, wait and signal based upon specified variable values. Functions to set/query condition variable attributes are also included. </li>
<br />
<li><strong>Synchronization:</strong><br/> 
	 Routines that manage read/write locks and barriers. 
</ul>
<br />
<br />
<br />

<div class="subtitle_2nd" id="creatingpthread">Creating Threads</div>
<br />
<ul>
	<li>Our <strong>main()</strong> program is a single, default thread. All other threads must be explicitly created by the programmer. </li>
	<li><strong>pthread_create</strong> creates a new thread and makes it executable. This routine can be called any number of times from anywhere within our code. </li>
	<li><strong>pthread_create (thread,attr,start_routine,arg) </strong> arguments: 
	<ul>
	<li><strong>thread:</strong> <br />
	An opaque, unique identifier for the new thread returned by the subroutine. </li>
	<li><strong>attr:</strong> <br />
	An opaque attribute object that may be used to set thread attributes. You can specify a thread attributes object, or NULL for the default values.  </li>
	<li><strong>start_routine:</strong> <br />
	the routine that the thread will execute once it is created. </li>
	<li><strong>arg:</strong> <br />
	A single argument that may be passed to <strong>start_routine</strong>. It must be passed by reference as a pointer cast of type void. NULL may be used if no argument is to be passed. </li>
	</ul>
	</li>
	<li>The maximum number of threads that may be created by a process is implementation dependent. </li>
	<li>Once created, threads are peers, and may create other threads. There is no implied hierarchy or dependency between threads. </li>
</ul>
<br />
<br />
<br />

<div class="subtitle_2nd" id="attributethread">Attributes of Threads</div>
<br />
<ul>
	<li>By default, a thread is created with certain attributes. Some of these attributes can be changed by the programmer via the thread attribute object. </li>
	<li><strong>pthread_attr_init()</strong> and <strong>pthread_attr_destroy()</strong> are used to initialize/destroy the thread attribute object. </li>
	<li>Other routines are then used to query/set specific attributes in the thread attribute object.  </li>
</ul>
<br />
<br />
<br />


<div class="subtitle_2nd" id="threadterm">Terminating Threads</div>
<br />
<ul>
	<li>There are several ways in which a Pthread may be terminated: 
	<ul>
	<li>The thread returns from its starting routine (the main routine for the initial thread).  </li>
	<li>The thread makes a call to the <strong>pthread_exit</strong> subroutine.  </li>
	<li>The thread is canceled by another thread via the <strong>pthread_cancel</strong> routine </li>
	<li>The entire process is terminated due to a call to either the exec or exit subroutines.  </li></ul>
	</li>
`	<li><strong>pthread_exit</strong> is used to explicitly exit a thread. Typically, the <strong>pthread_exit()</strong> routine is called after a thread has completed its work and is no longer required to exist. 
If <strong>main()</strong> finishes before the threads it has created, and exits with <strong>pthread_exit()</strong>, the other threads will continue to execute. Otherwise, they will be automatically terminated when <strong>main()</strong> finishes. </li>
	<li>The programmer may optionally specify a termination <strong>status</strong>, which is stored as a void pointer for any thread that may join the calling thread. </li>
	<li>Cleanup: the <strong>pthread_exit()</strong> routine does not close files; any files opened inside the thread will remain open after the thread is terminated. </li>
</ul>
<br />
<br />
<br />

<div class="subtitle_2nd" id="join">Join</div>
<br />
<ul>
	<li>When a thread is created, one of its attributes defines whether it is joinable or detached. Only threads that are created as joinable can be joined. If a thread is created as detached, it can never be joined. </li>
	<li>The final draft of the POSIX standard specifies that threads should be created as joinable. </li>
	<li>To explicitly create a thread as joinable or detached, the <strong>attr</strong> argument in the <strong>pthread_create()</strong> routine is used. The typical 4 step process is: 
	<ul>
	<li>Declare a pthread attribute variable of the <strong>pthread_attr_t</strong> data type. </li>
	<li>Initialize the attribute variable with <strong>pthread_attr_init()</strong>. </li>
	<li>Set the attribute detached status with <strong>pthread_attr_setdetachstate()</strong> </li>
	<li>When done, free library resources used by the attribute with <strong>pthread_attr_destroy()</strong></li>
</ul> 
</li>
</ul>
<br />
<br />
<br />

<div class="subtitle_2nd" id="detaching">Detaching</div>
<br />
<ul>
	<li>The <strong>pthread_detach()</strong> routine can be used to explicitly detach a thread even though it was created as joinable. </li>
	<li>There is no converse routine. </li>
</ul>


<br />
<br />
<br />
<div class="subtitle_2nd" id="class4pthread">C++ Classes for Pthreads</div>
<br />
<p>We'll make C++ classes <strong>Runnable</strong> and <strong>Thread</strong> for <strong>Pthreads</strong>. The interfaces are almost identical to the <strong>Win32</strong> version of the <a href="multithreaded2.html" target="_blank">previous chapter</a>. The only difference is the <strong>Thread</strong> class constructor has a parameter indicating whether or not the thread is to be created in a detached state. The default is set to <strong>undetached</strong></p>
<p>In this code, we added <strong>communications</strong> between the threads. We selected shared memory to demonstrate the communications between the threads. Because threads in the same program can reference global variables or call methods on a shared object, threads in different processes can access the same kernel objects by calling kernel routines. </p>

<pre>
#include &lt;iostream&gt;
#include &lt;pthread.h&gt;
#include &lt;cassert&gt;
#include &lt;error.h&gt;

using namespace std;

class <font color="blue">Runnable</font> {
public:
	virtual void* run() = 0;
	virtual ~Runnable() = 0;
};

// Pure virtual destructor: function body required
Runnable::~Runnable(){};

class <font color="blue">Thread</font> {
public:
	Thread(auto_ptr&lt;Runnable&gt; run, bool isDetached = false);
	Thread(bool isDetached = false);
	virtual ~Thread();
	void start();
	void* join();
private:
	// thread ID
	pthread_t PthreadThreadID;
	// true if thread created in detached state
	bool detached;
	pthread_attr_t threadAttribute;
	// runnable object will be deleted automatically
	auto_ptr&lt;Runnable&gt; runnable;
	Thread(const Thread&);
	const Thread& operator=(const Thread&);
	// called when run() completes
	void setCompleted();
	// stores return value from run()
	void* result;
	virtual void* run() {}
	static void* startThreadRunnable(void* pVoid);
	static void* startThread(void* pVoid);
	void printError(char * msg, int status, char* fileName, int lineNumber);
};

Thread::Thread(auto_ptr&lt;Runnable&gt; r, bool isDetached) : 
		runnable(r), detached(isDetached) {
	if(!runnable.get()){
		cout &lt;&lt; "Thread::Thread(auto_ptr&lt;Runnable&gt; r, bool isDetached)"\
		"failed at " << " " << __FILE__ <<":" << __LINE__ << "-" <<
		" runnable is NULL" << endl;
		exit(-1);
	}
}

Thread::Thread(bool isDetached) : runnable(NULL), detached(isDetached) {}

void* Thread::startThreadRunnable(void* pVoid) {
	// thread start function when a Runnable is involved
	Thread* runnableThread = static_cast&lt;Thread*&gt;(pVoid);
	assert(runnableThread);
	runnableThread->result = runnableThread->runnable->run();
	runnableThread->setCompleted();
	return runnableThread->result;
}

void* Thread::startThread(void* pVoid) {
	// thread start function when no Runnable is involved
	Thread* aThread = static_cast&lt;Thread*&gt;(pVoid);
	assert(aThread);
	aThread->result = aThread->run();
	aThread->setCompleted();
	return aThread->result;
}

Thread::~Thread() {}

void Thread::start() {
	// initialize attribute object
	int status = <font color="blue">pthread_attr_init</font>(&threadAttribute);
	if(status) {
		printError("pthread_attr_init failed at", status,
			__FILE__, __LINE__);
		exit(status);
	}

	// set the scheduling scope attribute
	status = <font color="blue">pthread_attr_setscope</font>(&threadAttribute,
					PTHREAD_SCOPE_SYSTEM);
	if(status) {
		printError("pthread_attr_setscope failed at", status,
			__FILE__, __LINE__);
		exit(status);
	}

	if(!detached) {
		if(!runnable.get()) {
			status = <font color="blue">pthread_create</font>(&PthreadThreadID, &threadAttribute,
				Thread::startThread, (void*)this);	
			if(status) {
				printError("pthread_create failed at", status,
					__FILE__, __LINE__);
				exit(status);
			}
		}
		else {
			status = <font color="blue">pthread_create</font>(&PthreadThreadID, &threadAttribute,
				Thread::startThreadRunnable, (void*)this);	
			if(status) {
				printError("pthread_create failed at", status,
					__FILE__, __LINE__);
				exit(status);
			}
		}
	}
	else {
		// set the detachstate attribute to detached
		status = <font color="blue">pthread_attr_setdetachstate</font>(&threadAttribute,
						PTHREAD_CREATE_DETACHED);	
		if(status) {
			printError("pthread_attr_setdetachstate failed at", status,
			__FILE__, __LINE__);
			exit(status);
		}

		if(!runnable.get()) {
			status = <font color="blue">pthread_create</font>(&PthreadThreadID, &threadAttribute,
				Thread::startThread, (void*)this);	
			if(status) {
				printError("pthread_create failed at", status,
					__FILE__, __LINE__);
				exit(status);
			}
		}
		else {
			status = <font color="blue">pthread_create</font>(&PthreadThreadID, &threadAttribute,
				Thread::startThreadRunnable, (void*)this);	
			if(status) {
				printError("pthread_create failed at", status,
					__FILE__, __LINE__);
				exit(status);
			}
		}
	}
	status = <font color="blue">pthread_attr_destroy</font>(&threadAttribute);
	if(status) {
		printError("pthread_attr_destroy failed at", status,
			__FILE__, __LINE__);
		exit(status);
	}
}


void* Thread::join() {
	// A thread calling T.join() waits until thread T completes.
	int status = <font color="blue">pthread_join</font>(PthreadThreadID, NULL);
	// result was already saved by thread start function
	if(status) {
		printError("pthread_join failed at", status,
			__FILE__, __LINE__);
		exit(status);
	}
	return result;
}

void Thread::setCompleted() {
// completion handled by pthread_join()
}

void Thread::printError(char * msg, int status, char* fileName, int lineNumber) {
	cout << msg << " " << fileName << ":" << lineNumber <<
		"-" << strerror(status) << endl;
}


// shared variable
int s = 0;

class <font color="blue">communicatingThread</font>: public Thread {
public:
	communicatingThread(int ID) : myID(ID) {}
	virtual void* run();
private:
	int myID;
};

void* communicatingThread::run() {
	cout << "Thread " << myID << " is running!" << endl;
	// increment s by million times
	for (int i = 0; i < 1000000; i++) s+=1;
	return 0;
}

int main() {

	auto_ptr&lt;communicatingThread&gt; thread1(new communicatingThread(1));
	auto_ptr&lt;communicatingThread&gt; thread2(new communicatingThread(2));
	thread1->start();
	thread2->start();
	thread1->join();
	thread2->join();

	cout << "s = " << s << endl; 
	return 0;
}
</pre>
<br />
<ol>
	<li>In <strong>main()</strong>, we created two <strong>communicatingTthread</strong>s.
<pre>
auto_ptr&lt;communicatingThread&gt; thread1(new communicatingThread(1));
auto_ptr&lt;communicatingThread&gt; thread2(new communicatingThread(2));
</pre>
	</li>
	<li>Each <strong>communicatingThread</strong> increments the global shared variable <strong>s</strong> one million times.
<pre>
for (int i = 0; i < 1000000; i++) s+=1;
</pre>
	</li>
	<li>The <strong>main</strong> thread uses <strong>join()</strong> to wait for the <strong>communicatingThread</strong> to complete.
<pre>
thread1->join();
thread2->join();
</pre>
	</li>
</ol>
<br />
<p>The results from the run should be 2,000,000, most of the runs.</p>
<p><strong>Note</strong><br />
We may get a message saying "<strong>undefined reference to pthread_join</strong>", when  we compile/link with <strong>g++ code.cpp</strong>. <br />
Then, try <strong>g++ code.cpp -lpthread</strong>. </p>

<br />
<br />
<img src="images/multithread3/YangYang2.png" alt="YangYang2"/>
<br />
<br />


<br /><br />
<div class="subtitle_2nd" id="FullList">Full List of C++ Tutorials</div>
<ul>
   <li><a href="cpptut.html">C++ Home</a> </li>
   <li><a href="string.html">String</a> </li>
   <li><a href="constructor.html">Constructor</a> </li>
   <li><a href="operatoroverloading.html">Operator Overloading</a> </li>
   <li><a href="virtualfunctions.html">Virtual Functions</a></li>
   <li><a href="dynamic_cast.html">Dynamic Cast Operator</a></li>
   <li><a href="typecast.html">Type Cast Operators</a></li>
   <li><a href="autoptr.html">Class auto_ptr</a></li>
   <li><a href="templates.html">Templates</a></li>
   <li><a href="references.html">References for Built-in Types</a></li>
   <li><a href="valuevsreference.html">Pass by Value vs. Pass by Reference</a></li>
   <li><a href="memoryallocation.html">Memory Allocation</a></li>
   <li><a href="friendclass.html">Friend Functions and Friend Classes</a></li>
   <li><a href="functors.html">Functors</a></li>
   <li><a href="statics.html">Static Variables and Static Class Members</a></li>
   <li><a href="exceptions.html">Exceptions</a></li>
   <li><a href="pointers.html">Pointers</a></li>
   <li><a href="pointers2.html">Pointers II</a></li>
   <li><a href="pointers3.html">Pointers III</a></li>
   <li><a href="assembly.html">Taste of Assembly</a></li>
   <li><a href="smallprograms.html">Small Programs</a></li>
   <li><a href="linkedlist.html">Linked List Examples</a></li>
   <li><a href="binarytree.html">Binary Tree Example Code</a></li>
   <li><a href="stl.html">Standard Template Library (STL) I</a></li>
   <li><a href="stl2.html">Standard Template Library (STL) II - Maps</a></li>
   <li><a href="slicing.html">Object Slicing and Virtual Table</a></li>
   <li><a href="this_pointer.html">The this Pointer</a></li>
   <li><a href="stackunwinding.html">Stack Unwinding</a></li>
   <li><a href="upcasting_downcasting.html">Upcasting and Downcasting</a></li>
   <li><a href="object_returning.html">Object Returning</a></li>
   <li><a href="private_inheritance.html">Private Inheritance</a></li>
   <li><a href="cplusplus_keywords.html">C++_Keywords</a></li>
   <li><a href="multithreaded.html">Multi-Threaded Programming - Terminology</a></li>
   <li><a href="multithreaded2A.html">Multi-Threaded Programming II - Native Thread for Win32 (A) </a></li>
   <li><a href="multithreaded2B.html">Multi-Threaded Programming II -  Native Thread for Win32 (B) </a></li>
   <li><a href="multithreaded2C.html">Multi-Threaded Programming II -  Native Thread for Win32 (C) </a></li>
   <li><a href="multithreaded2.html">Multi-Threaded Programming II - C++ Thread for Win32</a></li>
   <li><a href="multithreaded3.html">Multi-Threaded Programming III - C++ Class Thread for Pthreads</a></li>
   <li><a href="multithreadedDebugging.html">Multithread Debugging</a></li>
   <li><a href="embeddedSystemsProgramming.html">Embedded Systems Programming</a></li>
   <li><a href="boost.html">Boost</a></li>
   <li>Programming Questions and Solutions
    <ul>
       <li><a href="quiz_strings_arrays.html">Strings and Arrays</a></li>
       <li><a href="quiz_linkedlist.html">Linked List</a></li>
       <li><a href="quiz_recursion.html">Recursion</a></li>
       <li><a href="quiz_bit_manipulation.html">Bit Manipulation</a> </li>
       <li><a href="google_interview_questions.html">140 Google Interview Questions</a> </li>
    </ul>
   </li>
</ul>

<br /><br />


<br />


<br />
<br />
<br />


</div>
</div>
<div class="smallgraytext" id="footer"><a href="../index.html">Home</a>
| <a href="../about_us.html">About Us</a>
| <a href="../products.html">products</a>
| <a href="../our_services.html">Our Services</a>
| <a href="#">Contact Us</a>
| Bogotobogo &copy; 2011 | <a target="_blank" href="http://www.bogotobogo.com">Bogotobogo </a>
</div>
</div>
</div>
</body>
</html>

